//
//  Extension.swift
//  WLLWeibo
//
//  Created by 王乐乐 on 16/8/9.
//  Copyright © 2016年 itcast. All rights reserved.
//

import UIKit

extension UIImageView {
    //便利构造函数
    convenience init(imageName:String){
        self.init(image:UIImage(named: imageName))
    }

    /**
     对 SD_image 封装一次
     
     - parameter imagName:             图片名字
     - parameter placeholderImageName: 站位图片
     */
    func ll_setImageWithString(imagName:String?,placeholderImageName: String)  {
        self.sd_setImageWithURL(NSURL(string: imagName ?? ""), placeholderImage: UIImage(named: placeholderImageName))
    }
}